﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace ProjectTemplate.Model.Entities
{
    public class Category
    {
        /// <summary>
        /// 分类ID
        /// </summary>
        [Display(Name = "分类ID")]
        [SugarColumn(ColumnDescription = "分类ID", IsPrimaryKey = true)]
        public long Id { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        [Display(Name = "分类名称")]
        [SugarColumn(ColumnDescription = "分类名称", Length = 20)]
        public string? Name { get; set; }

        /// <summary>
        /// 分类排序
        /// </summary>
        [Display(Name = "分类排序")]
        [SugarColumn(ColumnDescription = "分类排序", IsNullable = true)]
        public int Sort { get; set; }

        /// <summary>
        /// 分类图片
        /// </summary>
        [Display(Name = "分类图片")]
        [SugarColumn(ColumnDescription = "分类图片", IsNullable = true, Length = 500)]
        public string? ImageUrl { get; set; }

        /// <summary>
        /// 是否显示
        /// </summary>
        [Display(Name = "是否显示")]
        [SugarColumn(ColumnDescription = "是否显示")]
        public bool IsShow { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [SugarColumn(ColumnDescription = "创建时间")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [Display(Name = "是否删除")]
        [SugarColumn(ColumnDescription = "是否删除")]
        public bool IsDelete { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Display(Name = "更新时间")]
        [SugarColumn(ColumnDescription = "更新时间")]
        public DateTime UpdateTime { get; set; }

    }
}
